﻿@using MvcMall.AdminPortal.Controllers.GoodsBrand.ViewModels;
@using MvcMall.Framework.MvcPager;
@using MvcContrib.UI.Grid;
@model PagedList<GoodsBrandDtoModel>
<script>
    $(function () {
        $.ajaxSetup({ cache: false });
    });
</script>
<div id="goodsBrandList">
    <table width="100%">
        <tr>
            <th>
                品牌Id
            </th>
            <th>
                品牌名称
            </th>
            <th>
                品牌状态
            </th>
            <th>
                所属分类
            </th>
            <th>
                排序编号
            </th>
            <th>
                提交网商
            </th>
            <th>
                审核人
            </th>
            <th>
                审核时间
            </th>
            <th>
                创建时间
            </th>
            <th>
            </th>
        </tr>
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @item.BrandId
                </td>
                <td>
                    @item.BrandName
                </td>
                <td>
                    @item.BrandStatus.ToString()
                </td>
                <td>
                    @item.CatName
                </td>
                <td>
                    @item.SortOrder
                </td>
                <td>
                    @item.StoreName
                </td>
                <td>
                    @item.AdminUserName
                </td>
                <td>
                    @item.ModifyTime
                </td>
                <td>
                    @item.CreateTime
                </td>
                <td>
                    @Html.ActionLink("修改", "Edit", new { @brandId = item.BrandId })
                    @if (item.BrandStatus == MvcMall.Core.Enums.GoodsBrandStatus.未审核)
                    {
                       @Html.ActionLink("审核", "ShenHe", new { @brandId = item.BrandId })
                    }
                </td>
            </tr>
        }
    </table>
    @Html.AjaxPager(Model, new AjaxOptions { UpdateTargetId = "goodsBrandList" })
</div>
